package com.timmy.bluetooth.scan;

import java.util.Comparator;

/**
 * 根据设备的信号大小对设备进行排序
 */
public class SortComparator implements Comparator {
    @Override
    public int compare(Object lhs, Object rhs) {
        DeviceInfo a = (DeviceInfo) lhs;
        DeviceInfo b = (DeviceInfo) rhs;

        return (b.getRssi() - a.getRssi());
    }
}